package com.icode.core.dto.house;

import com.icode.core.model.house.HouseWeekTime;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-6-24
 * Time: 下午2:24
 * To change this template use File | Settings | File Templates.
 */
public class HouseWeekTimeDTO {

    private String guid;
    private String start;
    private String end;
    private String houseWeekGuid;
    private int month;
    private boolean  status;

    public HouseWeekTimeDTO() {
    }

    public HouseWeekTimeDTO(String guid, String start, String end,int month, String houseWeekGuid,boolean status) {
        this.guid = guid;
        this.start = start;
        this.end = end;
        this.month=month;
        this.houseWeekGuid = houseWeekGuid;
        this.status = status;
    }



    public static HouseWeekTimeDTO toDTO(HouseWeekTime houseWeekTime) {
        return new HouseWeekTimeDTO(houseWeekTime.guid(), houseWeekTime.start(), houseWeekTime.end(), houseWeekTime.month(),houseWeekTime.houseWeek().guid(),houseWeekTime.status());
    }

    public static List<HouseWeekTimeDTO> toDTOs(List<HouseWeekTime> houseWeekTimes) {
        List<HouseWeekTimeDTO> houseWeekTimeDTOs = new ArrayList<>();
        for (HouseWeekTime h : houseWeekTimes) {
            houseWeekTimeDTOs.add(toDTO(h));
        }
        return houseWeekTimeDTOs;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getHouseWeekGuid() {
        return houseWeekGuid;
    }

    public void setHouseWeekGuid(String houseWeekGuid) {
        this.houseWeekGuid = houseWeekGuid;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }
}
